#!/usr/bin/python
#coding:utf-8
'''
ip工具类
'''

def getIp(self):
    '''
    获取当前主机内网ip
    '''
    import socket
    s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
    s.connect(("8.8.8.8", 80))
    return s.getsockname()[0]